//
//  ViewController.m
//  第九节作业
//
//  Created by dllo on 16/3/21.
//  Copyright © 2016年 Apon. All rights reserved.
//

#import "ViewController.h"
#import "LTView.h"
@interface ViewController ()
@property (nonatomic, retain) UIButton *button;
@end

@implementation ViewController
- (void)dealloc{
    [_button release];
    [super dealloc];
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor redColor];
    self.navigationItem.title = @"第一页";
    [self createtLabelAndText];
    [self createButton];
}


-(void)createtLabelAndText{
    LTView *view1 = [[LTView alloc]initWithFrame:CGRectMake(30, 250, 350, 50) WithText:@"账号" placeHolder:@"请输入账号"];
    [self.view addSubview:view1];
    [view1 release];
    
    
    LTView *view2 = [[LTView alloc]initWithFrame:CGRectMake(30, 310, 350, 50) WithText:@"密码" placeHolder:@"请输入密码"];
    [self.view addSubview:view2];
    [view2 release];
    
   

}
- (void)createButton{
    self.button = [UIButton buttonWithType:UIButtonTypeSystem];
    self.button.frame = CGRectMake(30, 400, 100, 50);
    [self.button setTitle:@"登录" forState:UIControlStateNormal];
    self.button.titleLabel.font = [UIFont systemFontOfSize:25];
    [self.view addSubview:self.button];
    [self.button addTarget:self action:@selector(handleButton:) forControlEvents:UIControlEventTouchUpInside];
    
    
    self.button = [UIButton buttonWithType:UIButtonTypeSystem];
    self.button.frame = CGRectMake(150, 400, 100, 50);
    [self.button setTitle:@"找回密码" forState:UIControlStateNormal];
    self.button.titleLabel.font = [UIFont systemFontOfSize:25];
    [self.view addSubview:self.button];
    [self.button addTarget:self action:@selector(handleButton1:) forControlEvents:UIControlEventTouchUpInside];
    
    self.button = [UIButton buttonWithType:UIButtonTypeSystem];
    self.button.frame = CGRectMake(280, 400, 100, 50);
    [self.button setTitle:@"注册" forState:UIControlStateNormal];
    self.button.titleLabel.font = [UIFont systemFontOfSize:25];
    [self.view addSubview:self.button];
    [self.button addTarget:self action:@selector(handleButton2:) forControlEvents:UIControlEventTouchUpInside];
    
    
    
    
    
}
- (void)handleButton:(UIButton *)button{
    
}

- (void)handleButton1:(UIButton *)button{
    
}


- (void)handleButton2:(UIButton *)button{
    
}







- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
